I run a script in win 7 Enterprise it worked but not in window 8.1

I run a script that hides folders and it worked in window 7 Enterprise, but then when I tried it in window 8.1 it did not work at all. Is there something I am missing ?
public void StartDir()
DirectoryInfo dii;
String discT = @"C:\\Test0137";
String disc1 = discT + @"\NotePsn";
dii = Directory.CreateDirectory(disc1);
ToggleHidden(disc1);
public void ToggleHidden(string filename)
string path = filename;
DirectoryInfo di = Directory.CreateDirectory(path);
di.Attributes = FileAttributes.Directory | FileAttributes.Hidden;

Following the suggestion from Thomas, I modified my script. It worked perfectly on my Window 7 Enterprise.Then I just took my flash-memory(where my script reside) and plugged it in my laptop (window 8.1) and started to run the script but it did not hide
the directory I intended to hide, and I did not get any  error message either. I also tried to generate directories in different discs ...still it did not work. This Script is the corrected version after the suggestion of Thomas and Michael Taylor:
public void StartDir()
DirectoryInfo dii;
String discT = @"C:\\Test0137";
String disc1 = discT + @"\NotePsn";
dii = Directory.CreateDirectory(disc1);
ToggleHidden(disc1);
public void ToggleHidden(string filename)
string path = filename;
DirectoryInfo di = new DirectoryInfo (path);
di.Attributes = FileAttributes.Directory | FileAttributes.Hidden;

Similar Messages

  • Someone is using faebook to run java script to get data and email from me in windows 8

    someone is using faebook to run java script  to get  data  and  email  from  me in  windows  8

    Is this a developer question?
    Jeff Sanders (MSFT)
    @jsandersrocks - Windows Store Developer Solutions
    @WSDevSol
    Getting Started With Windows Azure Mobile Services development?
    Click here
    Getting Started With Windows Phone or Store app development?
    Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

  • I can't open firefox the running but not responding window opens and says to close the existing window. I can't do that shutting down the computer doesn't do anything to help. I've done all the suggestions here. I've uninstalled and reinstalled firefox

    Firefox will not open. I get the firefox is already running but not responding window... I have tried rebooting with no help. I have tried to end the process via cntrl+shift+esc and nothing firefox is listed to end. I have tried find the app data via the run icon in the start up window, I have no run icon on this system (Acer with windows vista(?)
    == This happened ==
    Every time Firefox opened
    == The computer was hard shut down and did a improper shut down scan when it was restarted ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; FunWebProducts; GTB6.5; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)

    I am having a similar problem. Running Xp.
    Latest revision of firefox.
    After using firefox for a while if I exit, parent.lock is locked and i have to reboot to reload firefox.
    I have killed all firefox applications from task manager (usually there are none). and I have tried 3 different "file unlock" programs including unlocker to no avail.
    I also recently installed a program that shows -all- open files, and parent.lock is not listed, and thus not closable/unlockable from there.

  • I have a php module which runs fine in Firefox and all other browsers but not Safari. It always run twice - I see a small ? in upper right corner which is causing it to run twice but NO idea why? Help - thank you

    I have a php module which runs fine in Firefox and all other browsers but not Safari. It always run twice - I see a small ? in upper right corner which is causing it to run twice but NO idea why? I read it MAY have something to do with am image it cannot load but I see them all loaded.  Help - thank you

    Could you share a link to the page?
    Seeing it in context and in our browsers is much easier to debug.
    If not, make sure to run the validator here The W3C Markup Validation Service and clear out any problems. HTML errors, especially structural ones, will cause all kinds of display problems in various browsers/versions/platforms.

  • Why does a specific site open with Firefox 3.6 running under Windows 7 Ulimate but not under Windows 7 professional?

    Why does a specific site open with Firefox 3.6 running under Windows 7 Ulimate but not under Windows 7 professional?
    == URL of affected sites ==
    http://www.bmw.co.uk

    Why does a specific site open with Firefox 3.6 running under Windows 7 Ulimate but not under Windows 7 professional?
    == URL of affected sites ==
    http://www.bmw.co.uk

  • I am new at Captivate 8 and I have created a learning project using an existing power point presentation.  I have added a button that will allow my students to view a video on the subject.  When I run the project in Preview the button works but when I pub

    I am new at Captivate 8 and I have created a learning project using an existing power point presentation.  I have added a button that will allow my students to view a video on the subject.  When I run the project in Preview the button works but when I publish it, it stops working.

    I added an Interactions button and in the Actions on Success I open an URL or file. I have placed the video on our web server.   In the URL I point to our web server "http://www.wmabhs.org/Media/Add Client 3rd Party Coverage.mp4".  If I run this from any browser it works.  So what do you think I have done wrong?

  • My address bar does not autocomplete. Running Windows XP and it was working but not now. How do I start the autocomplete?

    My computer crashed and it has been restored. I am running Windows XP and I did not re-install Firefox Aurora after the computer was restored with new motherboard and HDs. All of my software works, but the autocomplete does not. Firefox remembers my username for logging in and my password. It is just the autocomplete. I have to completely type in the website name. When I open the History and Bookmarks window, there are no entries. The yellow star in the address bar also does not work. When I click on it, nothing happens.

    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    Please report back soon.

  • Safari 4.0.3 running OSX 10.6.1 -  Pages are loading but NOT thumbnails?

    Just upgraded to OSX 10.6.1 running Safari 4.0.3 last week - everything was working BEFORE the upgrade - but now for some reason I have an issue where pages ARE loading including larger banners, text flash animations etc, but if the site contains small thumbnails they are not loading.
    The icon in the web bar spins and spins for ages and then suddenly where the thumbnails should be I get the blue question make as if the links are broken - which there not as this is happening to well know sites such as youtube gettyimages and ebay and its just to the thumbnails?????
    Take ebay for example, the homepage page loads in fine, and if I search for a product - the page with the listing all loads but not the thumbnail images, yet if I click a listing the full page loads without a problem?
    Any advice, I have cleared the cookies and javascript database all to no avail?

    HI,
    Try Safari Maintenance
    Carolyn

  • RemoteFX Display problems with Windows 8.1 VM but not with Windows 7 VM running on Hyper-V VDI Server 2012R2

    Has anyone seen anything like this?
    After many, many, hours of wading through and eliminating potential variables the issue has been narrowed down to being present with a Windows 8.1 VM and not on Windows 7 VM.
    The problem is with glitchy display issues (Random Pixellation, Fuzzy Screen areas, Entire Screen filled with random shapes/colors etc.).  
    This is a Server 2012 R2 environment it is running Hyper-V Remote Desktop Virtualization Host.
    An Nvidia Quadro K2200 adapter has been enabled for RemoteFX and passed through.
    Also have tried Nvidia Grid K2 adapter. Both adapters use same driver set and multiple driver versions have been tested.
    Two Generation 1 VM's have been created.  One for WIndows 8.1, One for Windows 7.  All updates installed.
    Each VM uses the same set of Hyper-V resources, Virtual Switch etc.  (The settings for each VM are the same).
    With RemoteFX disabled on each VM the issue is not present on either VM.
    With RemoteFX enabled on each VM the issue is present on the Windows 8.1 VM and not the Windows 7 VM.
    There is no difference if only one VM at a time is enabled and running.  (Not GPU load related)
    Talmage D. Holt

    Hi,
    Generation 2 virtual machines have a simplified virtual hardware model, and supports Unified Extensible Firmware Interface (UEFI) firmware instead of BIOS-based firmware. The majority of legacy devices have also been removed from generation 2 virtual machines.
    You can check below article might helpful for your case.
    Generation 2 Virtual Machine Overview
    https://technet.microsoft.com/en-us/library/dn282285.aspx
    RemoteFX vGPU Improvements in Windows Server 2012 R2
    http://blogs.msdn.com/b/rds/archive/2013/12/04/remotefx-vgpu-improvements-in-windows-server-2012-r2.aspx
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • RemoteFX Display problems with Windows 8.1 VM but not on Windows 7 VM. Both running on Hyper-V VDI Server 2012R2

    After many, many, hours of wading through and eliminating potential variables the issue has been narrowed down to being present with a Windows 8.1 VM and not on Windows 7 VM.
    The problem is with glitchy display issues (Random Pixellation, Fuzzy Screen areas, Entire Screen filled with random shapes/colors etc.).  
    This is a Server 2012 R2 environment it is running Hyper-V Remote Desktop Virtualization Host.
    An Nvidia Quadro K2200 adapter has been enabled for RemoteFX and passed through.
    Also have tried Nvidia Grid K2 adapter. Both adapters use same driver set and multiple driver versions have been tested.
    Two Generation 1 VM's have been created.  One for WIndows 8.1, One for Windows 7.  All updates installed.
    Each VM uses the same set of Hyper-V resources, Virtual Switch etc.  (The settings for each VM are the same).
    With RemoteFX disabled on each VM the issue is not present on either VM.
    With RemoteFX enabled on each VM the issue is present on the Windows 8.1 VM and not the Windows 7 VM.
    There is no difference if only one VM at a time is enabled and running.  (Not GPU load related)
    Does anyone have any ideas? 
    Talmage D. Holt

    Hi,
    Generation 2 virtual machines have a simplified virtual hardware model, and supports Unified Extensible Firmware Interface (UEFI) firmware instead of BIOS-based firmware. The majority of legacy devices have also been removed from generation 2 virtual machines.
    You can check below article might helpful for your case.
    Generation 2 Virtual Machine Overview
    https://technet.microsoft.com/en-us/library/dn282285.aspx
    RemoteFX vGPU Improvements in Windows Server 2012 R2
    http://blogs.msdn.com/b/rds/archive/2013/12/04/remotefx-vgpu-improvements-in-windows-server-2012-r2.aspx
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • What can I do when web pages with scripting display ok from a server but not locally?

    I have html and java script in the same folder path, both on a server and locally. The pages display correctly when accessed from the server, but not when accessed locally. Is there a change I can make to Firefox to solve this problem?

    An address starting with c: wouldn't be any kind of domain name. C: is the drive lettering system DOS and and later uses. By default, A: and B: are reserved for your first and second floppy disk drive. All hard drives are then named C: through Z:, if you have that many. C: is normally your startup disk.
    Anyway, their PDF file is incorrectly linked to a file directly on the C: drive of someone's computer. It's not going to work no matter what you do.

  • Running PSE7.0 on Win 7. Can I transfer to Windows 8.1?

    I am running Windows 7 with Photoshop Elements 7.0.  Can I transfer this to a  second Windows 8.1 system?

    Sure, you can use your pse 10 install dvd or download to install pse 10 on windows 8.1
    Your allowed to have two pse 10 installs on two of your own computers, otherwise if your planning not to use windows 7 anymore, deactivate pse 10 first.
    (Help>Deactivate)
    If you need the installer for pse 10:
    http://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-10-11-downloads.html

  • Powershell script sends e-mail in ISE but not from powershell command line

    I have created a script that generates a report of all users who do not have photos in Active Directory. The script runs and sends an e-mail to a distribution list. It runs fine in ISE, but I cannot run it from command line or as a scheduled task. Any suggestions
    what I am doing wrong?
    #Starts Powershell Snap-In
    Start-Transcript -path c:\Scripts\StaffWithoutPhotos.txt
    add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010 -erroraction silentlyContinue
    $mailboxes = $null
    $mailboxes = @(Get-Mailbox -OrganizationalUnit "Staff User Accounts" -ResultSize Unlimited | Where {$_.HasPicture -eq $False})
    Write-Host $mailboxes
    $report = @()
    foreach ($mailbox in $mailboxes)
    $mbObj = New-Object PSObject
        $mbObj | Add-Member -MemberType NoteProperty -Name "Display Name" -Value $mailbox.DisplayName
        $report += $mbObj
    Write-Host "Diagnostic Output"
    Write-Host "Before Mailbox value check"
    Write-Host $report
    Write-Host "After Mailbox Value check"
    if ($mailboxes -ne $null)
        Write-Host $report
        #Send the report generated to the e-mail list specified above
        $style = "<style>BODY{font-family: Arial; font-size: 10pt;}"
        $style = $style + "TABLE{border: 1px solid black; border-collapse: collapse;}"
        $style = $style + "TH{border: 1px solid black; background: #dddddd; padding: 5px; }"
        $style = $style + "TD{border: 1px solid black; padding: 5px; }"
        $style = $style + "</style>"
        #Start-Sleep -Seconds 5
        $smtpserver = "MAIL.contoso.com"
        $msg = new-object Net.Mail.MailMessage
        $smtp = new-object Net.Mail.SmtpClient($smtpServer)
        $msg.From = "[email protected]"
        $msg.To.Add("[email protected]")
        #$msg.To.Add("[email protected]") #Used for testing
        $msg.Subject = "Staff without Photos report"
        $msg.Body = "This report contains the list of users who do not currently have photos."
        $msg.Body += "<p>"
        $msg.Body += "After photos are available for these users please submit a request to have their accounts updated or send an e-mail to <a href='mailto:[email protected]?Subject=Staff%20Photo%20Updates' target='_top'> [email protected]
    </a> with <b>Staff Photo Updates</b> in the subject."
        $msg.Body += "<p>"
        $msg.Body += "This report runs on Fridays and will only send a message if we have Staff without Photos. For more information please contact your systems administrator."
        $msg.Body += "<p>"
        $msg.Body += $Report | ConvertTo-Html -Head $Style
        $msg.IsBodyHTML = $true
        $smtp.Send($msg)
    Stop-Transcript

    So after researching further and not receiving any more replies I decided to rewrite the script and attempt to use the send-mailmessage function. I have been unable to determine the reason for the original not script not working. We use a very similar script
    to my original code which works to generate a report and e-mail that report as an attachment and it works without any problems.
    After re-writing the script and using the send-mailmessage function I was able to get this report to work as expected. This has now been set up as a scheduled task to run on a server once a week. Here is the final code:
    Start-Transcript -path c:\Scripts\StaffWithoutPhotos.txt
    #Starts Powershell Snap-In
    add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010 -erroraction silentlyContinue
    $mailboxes = $null
    $mailboxes = @(Get-Mailbox -OrganizationalUnit "contoso Staff User Accounts" -ResultSize Unlimited | Where {$_.HasPicture -eq $False})
    Write-Host $mailboxes
    $report = @()
    foreach ($mailbox in $mailboxes)
    $mbObj = New-Object PSObject
        $mbObj | Add-Member -MemberType NoteProperty -Name "Display Name" -Value $mailbox.DisplayName
        $report += $mbObj
    Write-Host "Diagnostic Output"
    Write-Host "Before Mailbox value check"
    Write-Host $report
    Write-Host "After Mailbox Value check"
    if ($mailboxes -ne $null)
        Write-Host $report
        #Send the report generated to the e-mail list specified above
        $style = "<style>BODY{font-family: Arial; font-size: 10pt;}"
        $style = $style + "TABLE{border: 1px solid black; border-collapse: collapse;}"
        $style = $style + "TH{border: 1px solid black; background: #dddddd; padding: 5px; }"
        $style = $style + "TD{border: 1px solid black; padding: 5px; }"
        $style = $style + "</style>"
        $smtpserver = "MAIL.contoso.com"
        $smtpFrom = "[email protected]"
        $smtpTo = "[email protected]
        $messageSubject = "Staff without Photos report"
        $Body = "This report contains the list of users who do not currently have photos."
        $Body += "<p>"
        $Body += "After photos are available for these users please submit a request to the Help Desk to have their accounts updated or send an e-mail to <a href='mailto:[email protected]?Subject=Staff%20Photo%20Updates' target='_top'> [email protected]
    </a> with <b><u>Staff Photo Updates</b></u> in the subject."
        $Body += "<p>"
        $Body += "This report runs on Fridays and will only send a message if we have Staff without Photos. For more information please contact your systems administrator."
        $Body += "<p>"
        $Body += $Report | ConvertTo-Html -Head $Style
        #Send the report
        send-mailmessage -from "$smtpFrom" -to "$smtpTo" -subject "$messageSubject" -body "$Body" -smtpServer "$smtpserver" -BodyAsHtml
    Stop-Transcript

  • Application running slow in ver 1.5, 1.6 but not in 1.4

    We have a application that was running very slow when we used any version sun java instead of MS java in IE6 SP2.
    I removed MS Java from IE and installed Sun java 1.4.2_16 and the applications starts in under 10sec's.
    But we had to test the other version of java as well, i then installed the other versions from 1.5 update 14 to 1.6 update 4 and the application takes about 30 to 40 sec to load the web page.
    I then looked at the development version of java 1.6 update 10 and version 7. In 1.6 update 10 the application would load but would not refresh the applets it would just hang. In version 7 the application would not start up at all.
    In all the versions i increased the memory parmeters from 128 to 256 and in version 1.6 i changed it to -Xmx300m as well but still the application was slow loading. Removed all the versions and reinstalled 1.4.2_14 and the application works fine and loads up under 10 sec.
    Does any one have any idea why this is happening.
    IE 6 sp2
    XP sp2 been used.

    You should try profiling the startup code.
    As a first go around, you might try getting a stack trace during the startup process and look for locks (see jstack).
    If your application is built on Swing, it's my understanding that the later versions of Java are more strict about use of the Event Dispatch Thread--pay particular attention to activity off the EDT locking the thread.

  • Application Runs Under Windows 8.1 But Not Under Windows XP (I Know XP Is Deprecated)

    The problem is with the obtuse error message put out by Windows's program loader. It reads, in part, "..is not a valid Win32 application." The application runs everywhere except on Windows XP. Looking for root cause of the problem. It's a very
    simple application. Only a few lines of code. 
    C:\Packaged-Software\32-BIT\Reboot.exe is not a valid Win32 application.
    Proposed nature of the problem:
    1. The file was downloaded from a website but the download was incomplete.
    2. The full file system filename path contains bad characters such blank space.
    3. Visual Studio constructed an application that won't run anywhere much less on XP.
    4. The supporting libraries are not properly installed (e.g. .NET Framework4, and VCREDIST).
    Retorts:
    1. The file wasn't downloaded from a website and is intact.
    2. The filename path doesn't contain any spaces.
    3. The application runs under Windows 8.1.  Also on Windows 7.
    4. The supporting libraries are properly installed.
    So, what's the problem?  One surely will not discover the root cause from "not a valid application."
    Body must be 4 to 60000 characters long.  I had put the code here.  It isn't 60000 character long.  But it validated as if there are more than 60000 characters.  Sorry for the incomplete submission due to website construction error.
    MARK D ROCKMAN

    Hi F7H2fw,
    How did you develop the application ?
    Here is a similar symptom and this may explain the issue somehow:
    Setup.exe is not a valid Win32 application
    http://blogs.msdn.com/b/vsnetsetup/archive/2012/10/16/setup-exe-is-not-a-valid-win32-application.aspx
    I suspect there is a compatibility issue here .
    Considering this is more likely a developing issue .It is recommended to ask for help from our MSDN Forum .They are more familiar with the developing issue .If it is possible ,please attach the code in that thread .Thanks for your understanding and cooperation.
    MSDN Forum
    https://social.msdn.microsoft.com/Forums/en-US/home
    Best regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for

  • Scheduling agreement to delivery order

    Hi All Please suggest me on the below issue I am creating in t code VA01 a delivery order(order type TAM) with reference to a Scheduling Agrement (LZM).I have put reason for rejection for a line item in scheduling agrement order.But still it is copie

  • Regarding Characteristics variable with Replacement path error

    Hi Masters I have created one replacement path variable on characteristics for 0material for first query. This query contains the details of material number only(50 values are available). My second query contains material numbers and material price a

  • Why won't SSH/SFTP work after the 10.6.8 update?

    I've tried just about eveything I can think of and have been googling information for awhile now but I figure I just ask the community! I just recently updated to 10.6.8 and now I cannot remotely log into our Linux machine running RedHat. Strange bec

  • ERROR!!! ~JSP CODES~

    Any problem with the following jsp code? <%@ page import=" java.io.*, java.util.*" %> <% boolean login_ok = false; Boolean result_obj = new Boolean(login_ok); result_obj = (Boolean)request.getAttribute("result"); login_ok = result_obj.booleanValue();

  • Incomplete Approval Work Item Removed from Agent Inbox

    Dear All WF Experts, I noticed this strange scenario: Let say Agent A and Agent B are sent a work item. If Agent A has executed the work item in SBWP previously, the work item is removed from Agent B's inbox (And the status is changed to 'STARTED').